package com.ruoyi.project.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.web.domain.BaseEntity;

import java.util.Date;
import java.util.List;

/**
 * 兑换码记录对象 sys_exchange
 *
 * @author theme
 * @date 2021-08-06
 */
public class SysExchange extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 码id
     */
    private Long exchangeId;

    /**
     * 活动id
     */
    @ApiModelProperty(name = "活动id")
    private Long companyId;

    /**
     * 立减金类型
     */
    @ApiModelProperty(name = "立减金类型")
    private String type;

    /**
     * 业务类型名称
     */
    @ApiModelProperty(name = "兑换码名称")
    @Excel(name = "兑换码名称",sort = 0)
    private String typeName;

    /**
     * 金额
     */
    @ApiModelProperty(name = "金额 ")
    @Excel(name = "金额",sort = 1)
    private String money;

    /**
     * 兑换码状态(数据字典0-未兑换 1-已兑换)
     */
    @ApiModelProperty(name = "兑换码状态")
    @Excel(name = "兑换码状态",sort = 2,dictType = "sys_exchange_status")
    private String status;

    /**
     * 0-未删 1-已删
     */
    @ApiModelProperty(name = "0-启用 1-停用")
    private Long deleted;

    /**
     * 兑换码值
     */
    @ApiModelProperty(name = "兑换码值")
    @Excel(name = "兑换码值",sort = 3)
    private String code;

    private Integer num;


    /** 字典编码 */
    private Long dictCode;

    /** 兑换时间 */
    @ApiModelProperty(name = "兑换时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @Excel(name = "兑换时间",sort = 5,dateFormat="yyyy-MM-dd HH:mm:ss")
    private Date exchangeTime;

    /** 用户id */
    @ApiModelProperty(name = "用户id")
    @Excel(name = "兑换人",sort = 4)
    private String openId;

    private List<SysExchange> exchangeList;

    public List<SysExchange> getExchangeList() {
        return exchangeList;
    }

    public void setExchangeList(List<SysExchange> exchangeList) {
        this.exchangeList = exchangeList;
    }

    public Long getDictCode() {
        return dictCode;
    }

    public void setDictCode(Long dictCode) {
        this.dictCode = dictCode;
    }


    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public void setExchangeId(Long exchangeId) {
        this.exchangeId = exchangeId;
    }

    public Long getExchangeId() {
        return exchangeId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public void setMoney(String money) {
        this.money = money;
    }

    public String getMoney() {
        return money;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    public void setDeleted(Long deleted) {
        this.deleted = deleted;
    }

    public Long getDeleted() {
        return deleted;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getCode() {
        return code;
    }

    public Date getExchangeTime() {
        return exchangeTime;
    }

    public void setExchangeTime(Date exchangeTime) {
        this.exchangeTime = exchangeTime;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("exchangeId", getExchangeId())
                .append("companyId", getCompanyId())
                .append("type", getType())
                .append("typeName", getTypeName())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("money", getMoney())
                .append("status", getStatus())
                .append("deleted", getDeleted())
                .append("remark", getRemark())
                .append("code", getCode())
                .toString();
    }
}
